<?php

class Tyh_Base_Controller extends Tyh_Core
{	
	public function __construct()
	{
		parent::__construct();
		
		$this->config	=& Tyh_Config::getInstance();
		$this->load		=& Tyh_Loader::getInstance();
		$this->error	=& Tyh_Error::getInstance();
		
		$this->action	=& Tyh_Hook_Action::create($this);	
		$this->filter	=& Tyh_Hook_Filter::create($this);
		
		$this->load->autoload(); // TODO: rename fn
		
		$this->load->autoLoader();
	}	
	
	// move to a default helper file??
	public function is_debug_on()
	{
		if( WP_DEBUG && $this->config->tyh_debug )
		{
			return TRUE;
		}
		
		return FALSE;
	}
}

